<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title>태그등록</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">


<style type="text/css">
<!--
@import url("css/style.css");
-->
</style>


<style type="text/css">
#info {
	font-family: 맑은 고딕, dotum, sans-serif, bold;
	font-size: 13px
}
</style>

</head>

<script type="text/javascript">
	function checkInfo() {
		var tagId = document.getElementById("tagId").value;
		var courseId = document.getElementById("courseId").value;

		// tagId를 입력했는지 검사합니다.
		if (tagId == "" || tagId == null) {
			alert("tagID를 입력하세요");
			document.getElementById("tagId").focus();
			return false;
		}

		// course를 입력했는지 검사합니다.
		if (courseId == "0" || courseId == null) {
			alert("코스를 선택하세요");
			return false;
		}

		document.getElementById("checkInfo()").submit();
		return true;
	}
</script>
<body>
	<form id="tagRegisterationform" action="tagRegisteration.course"
		name="fn" method="post">
		<div id="info">
			<br>
			<table align="left" style="margin-left: 20px">
				<tr>

					<td width="60" height="50"><img
						src="/nems/admin/images/course.png" width="40"
						/></td>

					<td>
						<h4
							style="font-weight: bold; color: #005700; text-align: left; font-size: 20px;">태그
							등록</h4>
					</td>
				</tr>
			</table>


			<br> <br> <br> <br>
			<hr style="width:680px">
			<table align="center" width="600" border="0">


				<tr align="left">

					<td width="300" height="35">태그ID</td>
					<td width="300"><input type="text" id="tagId" name="tagId"
						class="form-control" placeholder="태그ID" style="height: 20px;" /></td>
				</tr>

				<tr align="left">
					<td width="300" height="35">코스명</td>
					<td width="300"><select id="courseId" name="courseId">
							<option value='0'>선택하세요</option>

							<c:forEach var='course' items="${requestScope.courseList}">
								<option value='${course.courseId}'>${course.courseName}-${course.lecturer}</option>
							</c:forEach>
					</select>
				</tr>

			</table>
			<hr style="width:680px">
			<br> <br>
			<center>
				<button onclick="return checkInfo()" class="positive"
					style="vertical-align: middle; width: 70px;">
					<img src="admin/images/accept.png"
						style="width: 15px; height: 10px" />등록
				</button>
				&nbsp;
				<button type="reset" class="negative"
					style="vertical-align: middle; width: 70px;">
					<img src="admin/images/cancel.png"
						style="width: 15px; height: 10px" />취소
				</button>
			</center>
		</div>
	</form>
</body>
</html>